<template>
	<view class="wrap">
        <view class="detail_title">
            {{recordData.title}}
        </view>
		<view class="detail_text_box">
           <!-- <div class="detail_text" v-text="item" v-for="(item,index) in recordData.recordText" :key="index"></div> -->
           <div class="detail_text" v-html="recordData.text_container"></div>
        </view>
        <view class="detail_imgs">
            <image class="turtle_img" :src="'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-0ed04722-d35f-466f-abc4-ee7f9ea53842/2bb48133-d9b6-4a1f-b8a7-d747723ea958.jpeg'" mode="widthFix" />
        </view>
	</view>
</template>

<script>
	export default {
		components: {
			
		},
		data() {
			return {
				theId: "",
                recordData: {
                    // title: "喂食记录",
                    // recordText: ["体重 80g"," 体长 8.6cm"]
                }
			}
		},
		
		methods: {
			getDetail() {
                const that = this;
                uniCloud.callFunction({
                    name: 'getRecordDetail',
                    data: {
                        _id: this.theId
                    },
                    success(res) {
                        const result = res.result;
                        if (result.code == 200) {
                            that.recordData = result.data.data[0].record;
                        }
                        console.log('recordData',that.recordData)
                    },
                    fail(e) {
                        console.log(e);
                    }
                })
            }
		},
		onLoad(option) {
			this.theId = option.id;
            this.getDetail();
		}
	}
</script>

<style lang="scss" scoped>
.wrap{
	width: 100%;
	min-height: 100vh;
	overflow-x: hidden;
    // background: #eee;
    padding: 20rpx;
	.detail_title {
        font-size: 46rpx;
        text-align: center;
    }

    .detail_text_box {
        padding-top: 36rpx;
        .detail_text {
            font-size: 32rpx;
            padding-bottom: 10rpx;
        }
    }

    .detail_imgs {
        padding-top: 26rpx;
        width: 100%;
        .turtle_img {
            width: 100%;
        }
    }
}
</style>
